]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
AppSwitcher: Remove a lost timeout on destroy
authorRui Matos <tiagomatos@gmail.com>
Sat, 1 Dec 2012 19:40:13 +0000 (20:40 +0100)
committerRui Matos <tiagomatos@gmail.com>
Tue, 4 Dec 2012 09:06:37 +0000 (10:06 +0100)
Doesn't look harmful but there's no point in running this code after
we're destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=689528

js/ui/altTab.js

index 74a03a0fb0ea30dfd8b8f202ae4c26d16f4c4567..b5872192349244fe1ea82d8252e08ad8eda495fb 100644 (file)
@@ -417,6 +417,13 @@ const AppSwitcher = new Lang.Class({
         this._iconSize = 0;
         this._altTabPopup = altTabPopup;
         this._mouseTimeOutId = 0;
+
+        this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
+    },
+
+    _onDestroy: function() {
+        if (this._mouseTimeOutId != 0)
+            Mainloop.source_remove(this._mouseTimeOutId);
     },
 
     _getPreferredHeight: function (actor, forWidth, alloc) {